/<template>
  <div class="login">
      <ul>
          <li>
              <span>账号:</span><input type="text" v-model="user">
          </li>
           <li>
              <span>密码:</span><input type="text" v-model="pwd">
          </li>
          <li><button @click="deng">登录</button></li>
      </ul>
  </div>
</template>

<script>
export default {
   data(){
       return{
               user:"",
               pwd:"" 
       }
   },
 methods:{//方法
     deng(){//登录方法
         localStorage.setItem("token", this.user)
         this.$router.push("/home/homePage")
     }
 }
}
</script>

<style lang="scss">
.login{
    ul{
        width:100%;
        height:auto;
        li{
           span{
               display: inline-block;
               width:1rem;
               height:.5rem;
           }
           input{
               flex:1;
           }
        }
    }
}
</style>